/*
 * Copyright (c) 2025 CAX Conversion Project
 */
package com.comac.ins.bomt.domain.vo;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 树节点Vo
 *
 * @author zhanghongyi
 * @date 2024/8/5 17:48
 * @description TreeNodeVo
 */
@Data
public class BomtTreeNodeVo {
    /**
     * 编码
     */
    private String code;
    /**
     * 类型:NON_LEAF-非叶子节点，LEAF-叶子节点，@see TreeNodeTypeEnum
     */
    private String type;
    /**
     * 名称
     */
    private String name;

    /**
     * 附加信息
     */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private Map<String, Object> extra = new HashMap<>();

    /**
     * 子节点
     */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<BomtTreeNodeVo> children = new ArrayList<>();
}
